package com.netease.rtcdemo;


import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.webkit.WebView;

public class WebViewActivity extends AppCompatActivity {

    private static final boolean DEBUG = true;
    StatsHelper helper = StatsHelper.getInstance();
    private WebView webView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_webview);

        webView = findViewById(R.id.webview);
        String content = helper.htmlContent();
        webView.getSettings().setJavaScriptEnabled(true);
        Uri baseUrl = helper.getBaseUrlForAsset("performtest", "html");
        Log.d("qweqwe", "baseUrl:" + baseUrl.toString());
        Log.d("qweqwe", "content:" + content);
        webView.loadDataWithBaseURL(baseUrl.toString(), content, "text/html", "utf-8", null);
    }
    @Override
    protected void onResume(){
        super.onResume();
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
    }

    @Override
    protected void onStart() {
        super.onStart();

    }

    @Override
    protected void onStop() {
        super.onStop();
    }

}